﻿Module validaciones
    Public Sub validarInt(ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If (Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Microsoft.VisualBasic.ChrW(8)) Then
            e.Handled = True
        End If
    End Sub

    Public Sub validarDouble(ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If (Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Microsoft.VisualBasic.ChrW(8) And e.KeyChar <> Microsoft.VisualBasic.ChrW(46)) Then
            e.Handled = True
        End If
    End Sub

    Public Sub validarString(ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If (Not Char.IsLetter(e.KeyChar) And e.KeyChar <> Microsoft.VisualBasic.ChrW(8) And e.KeyChar <> Microsoft.VisualBasic.ChrW(32)) Then
            e.Handled = True
        End If
    End Sub
End Module
